package com.poisonh.unifiedauth.dialog;

import android.app.DialogFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;

import com.poisonh.unifiedauth.R;

/**
 * 其他扫描信息展示
 * Created by PoisonH on 2016/6/24.
 */
public class OtherInfoDialogFragment extends DialogFragment
{
    private TextView mTvOtherResults;
    private String mStrOtherResults;
    private Button mBtnSure;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
        View view = inflater.inflate(R.layout.layout_dialog_otherinfo, null);
        mStrOtherResults = getArguments().getString("OTHERSULTS");
        return view;
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState)
    {
        super.onViewCreated(view, savedInstanceState);
        mTvOtherResults = (TextView) view.findViewById(R.id.tv_otherinfodialog);
        mBtnSure = (Button) view.findViewById(R.id.btn_sure);
        mBtnSure.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View v)
            {
                dismiss();
            }
        });
        mTvOtherResults.setText("扫描结果：" + mStrOtherResults);
    }

}
